<?php

namespace Yolo\Service\Annotations;

use Attribute;
use Yolo\Service\Enums\HttpMethod;

#[Attribute(Attribute::TARGET_METHOD)]
class RESTFul
{
    protected HttpMethod $method;

    protected string $path;

    protected array $options;

    /**
     * 将一个方法标记为RESTFul接口
     * @param HttpMethod $method 请求方式
     * @param string $path 路径
     * @param array $options 其他参数
     */
    public function __construct(HttpMethod $method, string $path, array $options = [])
    {
        $this->method = $method;
        $this->path = $path;
        $this->options = $options;
    }
}
